<!--
 * @Author: 雷佳斌 leijiabin@yunjinhz.com
 * @Date: 2024-05-18 14:14:43
 * @LastEditors: 雷佳斌 leijiabin@yunjinhz.com
 * @LastEditTime: 2024-05-31 17:57:57
 * @FilePath: \zmglpt-ui-mobile-v1.1\dev\pages\tripleNetworkIntegration\teamworkFlowTransfer.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <view class="page"> </view>
</template>
  
<script>
import tripleNetworkIntegrationService from "@/service/tripleNetworkIntegration/tripleNetworkIntegration.service.js";


export default {
  onLoad() {
    let params = this.getRouteParam();
    this.getGridFusionTaskTaskInfo(params.bizUuid);
  },
  methods: {
    // 获取任务详情
    getGridFusionTaskTaskInfo(taskUuid) {
      this.$modal.showLoading("加载中...");
      let paras = { taskUuid };
      this.loading = true;
      tripleNetworkIntegrationService
        .getGridFusionTaskTaskInfo(paras)
        .then((res) => {
          this.$modal.hideLoading();
          this.loading = false;
          console.log(res);
          if (res.success) {
            let toUrl;
            switch (res.bean.task.taskStatus) {
              case "00":
              case "01":
                toUrl = "/pages/tripleNetworkIntegration/teamworkCreate";
                break;
              case "02":
              case "03":
              case "04":
              case "05":
              case "06":
                toUrl = "/pages/tripleNetworkIntegration/teamworkHandle";
                break;
              default:
                break;
            }

            this.setRouteParam({
              taskUuid: res.bean.task.taskUuid,
            });
            this.$u.route({
              url: toUrl,
              type: "redirect"
            });
          } else {
            this.$u.toast(res.msg);
          }
        })
        .catch(() => {
          this.$u.toast("数据获取失败!");
          this.$modal.hideLoading();
        });
    },
  },
};
</script>
  